import java.util.Scanner;
public class test {

	/**
	 * @param args
	 */
	@SuppressWarnings("unused")
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.println("What number would you like to check to be prime?");
		int ran;
		int ranmd;
		int prim;
		//String  liv;
		//liv="Yes";
		//for(int q=1; q<100; q++){
		//ran=(int) (Math.random()*100);
		ran=input.nextInt();
		prim=1;
		ranmd=ran;
		for (int i=2;i<ranmd-1;i++){
			if (ran%i==0){
				System.out.println("The number "+ran+" is not prime.");
				prim=0;
				break;
			}
		}
		if (prim==1) {
			System.out.println("The number "+ran+" is prime.");
		}
		String ans;
		System.out.println("Would you like to calculate another number?");
		ans=input.next();
		if (ans.equals("yes")){
			main(args);
		}
		else{
			System.out.println("Either you wanted to quit or entered something invalid so goodbye.");
		}
		}
	}

